import { VxeGridProps } from 'vxe-table';
import { BizStationUsageSummaryVo } from '@/api/station/usage/types';

export function getTableConfig(): VxeGridProps<BizStationUsageSummaryVo> {
  return {
    id: 'tenant',
    loading: false,
    height: 'auto',
    autoResize: true,
    border: 'inner',

    resizable: true,
    showOverflow: 'tooltip',
    stripe: true,
    rowConfig: {
      isHover: true,
      keyField: 'id'
      // height: 56
    },
    customConfig: {
      storage: true
    },
    columns: [
      { title: '序号', type: 'seq', width: 50 },
      { sortable: true, field: 'stationName', title: '站房名称' },
      { sortable: true, field: 'location', title: '区域' },
      { sortable: true, field: 'overLoadStatus', title: '状态', slots: { default: 'status' } },
      { sortable: true, field: 'softExpansion', title: '软扩容' },
      { sortable: true, field: 'dailyCountMax', title: '接入峰值' },
      { sortable: true, field: 'overloadTimeMax', title: '超限时长(峰值/分钟)' },
      { sortable: true, field: 'overloadTimeMedian', title: '超限时长(中位数/分钟)' },
      { sortable: true, field: 'overloadDays', title: '超限累计天数' },
      { sortable: true, field: 'handle', title: '操作', width: '120px', slots: { default: 'handle' } }
    ],
    data: [] as BizStationUsageSummaryVo[]
  };
}
